import request from '../utils/request'

const OrderSubmit = 'wx/order/submit' // 提交订单
export function orderSubmit (data) {
  return request({
    url: OrderSubmit,
    method: 'post',
    data
  })
}
const OrderPrepay = 'wx/order/prepay' // 订单的预支付会话
export function orderPrepay (data) {
  return request({
    url: OrderPrepay,
    method: 'post',
    data
  })
}
const OrderH5pay = 'wx/order/h5pay' // h5支付
export function orderH5pay (data) {
  return request({
    url: OrderH5pay,
    method: 'post',
    data
  })
}
export const OrderList = 'wx/order/list' // 订单列表
export function orderList (query) {
  return request({
    url: OrderList,
    method: 'get',
    params: query
  })
}
const OrderDetail = 'wx/order/detail' // 订单详情
export function orderDetail (query) {
  return request({
    url: OrderDetail,
    method: 'get',
    params: query
  })
}
const OrderCancel = 'wx/order/cancel' // 取消订单
export function orderCancel (data) {
  return request({
    url: OrderCancel,
    method: 'post',
    data
  })
}
const OrderRefund = 'wx/order/refund' // 退款取消订单
export function orderRefund (data) {
  return request({
    url: OrderRefund,
    method: 'post',
    data
  })
}
const OrderDelete = 'wx/order/delete' // 删除订单
export function orderDelete (data) {
  return request({
    url: OrderDelete,
    method: 'post',
    data
  })
}
const OrderConfirm = 'wx/order/confirm' // 确认收货
export function orderConfirm (data) {
  return request({
    url: OrderConfirm,
    method: 'post',
    data
  })
}
const OrderGoods = 'wx/order/goods' // 代评价商品信息
const OrderComment = 'wx/order/comment' // 评价订单商品信息

